package com.xyd.servlet;

import com.xyd.entity.Order;
import com.xyd.service.OrderService;
import com.xyd.service.impl.OrderServiceImpl;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 类描述：生成订单信息
 *
 * @author 张吉哲
 * @date 2021/1/15 9:22
 */
@WebServlet("/orderGenerateServlet")
public class OrderGenerateServlet extends HttpServlet {

  @Override
  protected void doPost(HttpServletRequest request, HttpServletResponse response)
      throws ServletException, IOException {
    String[] epIds = request.getParameterValues("epId");
    OrderService orderService = new OrderServiceImpl();
    Order order = orderService.generateOrder(epIds);
  }

  @Override
  protected void doGet(HttpServletRequest request, HttpServletResponse response)
      throws ServletException, IOException {
    doPost(request, response);
  }
}
